From: Dimitris Papastamos Date: Thu, 21 Oct 2010 12:19:45 +0000 (+0100) Subject: ASoC: soc-core: Fix codec->name memory leak X-Git-Tag: archive/raspbian/4.9.13-1+rpi1~10^2~11008^2~1226^2~327 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/success//%22http:/www.example.com/cgi/success/?a=commitdiff_plain;h=1aafcd4d6966453ab44587c6e1214d463f3e88e2;p=linux-4.9.git ASoC: soc-core: Fix codec->name memory leak Ensure that the codec->name is freed when unregistering the codec. Signed-off-by: Dimitris Papastamos Acked-by: Liam Girdwood Signed-off-by: Mark Brown --- diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index 862b1af5fbdf..70d9a7394b2b 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c @@ -3299,6 +3299,7 @@ found: if (codec->reg_cache) kfree(codec->reg_cache); + kfree(codec->name); kfree(codec); } EXPORT_SYMBOL_GPL(snd_soc_unregister_codec);